# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=systemsettings
pkgver=5.27.10
pkgrel=0
pkgdesc="Plasma system manager for hardware, software, and workspaces"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://kde.org/plasma-desktop/"
license="GPL-2.0-or-later"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	kactivities5-dev
	kactivities-stats5-dev
	kcmutils5-dev
	kconfig5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdeclarative5-dev
	kdoctools5-dev
	khtml-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	kirigami2-dev
	kitemviews5-dev
	kpackage5-dev
	kservice5-dev
	kwidgetsaddons5-dev
	kwindowsystem5-dev
	kxmlgui5-dev
	plasma-workspace-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/plasma/systemsettings.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/systemsettings-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-zsh-completion $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8331be5f1d35eaab782adda215abd8c9150bfd0d4919950f40b1a1a01ab384f87fb6e0bf08b341c6087df4aee314c8e663f59618f890e1ddc776c8a677b60012  systemsettings-5.27.10.tar.xz
"
